package lg.minecraft.plugin.pokedex.util;

import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;

import java.util.List;

/**
 * @author langle__
 * @version 1.0
 */
public class CommandUtil {

    public static void commandExecute(Player player, List<String> commands) {
        ConsoleCommandSender consoleSender = Bukkit.getConsoleSender();
        for (String command : commands) {
            Bukkit.dispatchCommand(consoleSender, command.replace("{player}", player.getName()));
        }
    }

}
